﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0,user-scalable=no" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black" />
    <title>详细信息</title>
    <link href="/View_Mobile/Frozenui1.3/css/frozen.css?ver=20171228" rel="stylesheet" />
    <link href="/View_Mobile/CSS/fs_gallery.css" rel="stylesheet" />
    <script src="/View_Mobile/JS/zepto.min.js"></script>
    <script src="/View_Mobile/Frozenui1.3/js/frozen.js"></script>
    <script src="/View_Mobile/JS/avalon1.47.js"></script>
    <script src="/View_Mobile/JS/ComFunJS.js?jsver=20160427"></script>
    <script src="/View_Mobile/JS/watermark.js"></script>
    <script src="/View_Mobile/JS/fs_gallery.js"></script>

    <script>
        //document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {
        //    //隐藏右上角按钮
        //    WeixinJSBridge.call('hideOptionMenu');
        //});
        var strId = ComFunJS.getQueryString("ID");
        var wxopenid = ComFunJS.getQueryString("wxopenid");

        var fheight = 0;

        var rwinfo = avalon.define({
            $id: "xxinfo",
            modelData: {},
            ztData: {},
            ydData: [],
            ydcount: 0,
            wydData: [],
            wydcount: 0,
            fjData: [],
            fjcount: 0,
            plData: [],
            plcount: 0,
            TypeName: "",
            pl: function () {
                $(".xxpl").toggle();
                $(".ui-footer").toggle();
            },
            yy: function () {
                if (rwinfo.ydData.size() > 0) {
                    var html = '<div class=" ui-label-list" style="overflow-y: auto;margin-top:10px;max-height:' + (fheight - 150) + 'px">';
                    $(rwinfo.ydData).each(function (index, ele) {
                        html = html + '<label class="ui-label" style="position: relative; width: auto;padding: 0 5px;margin: 0 5px 5px 0;">' + ComFunJS.convuser(ele) + '</label>';
                    })
                    html = html + '</div>';

                    $.dialog({
                        title: '已阅人员',
                        content: html,
                        button: ["确认"]
                    });
                    $(".ui-dialog-ft").find("button").click(function () {
                        $(".ui-dialog").remove();
                    });
                }
            },
            wy: function () {
                if (rwinfo.wydData.size() > 0) {
                    var html = '<div class=" ui-label-list" style="overflow-y: auto;margin-top:10px;max-height:' + (fheight - 150) + 'px">';
                    $(rwinfo.wydData).each(function (index, ele) {
                        if (ComFunJS.convuser(ele)) {
                            html = html + '<label class="ui-label" style="position: relative; width: auto;padding: 0 5px;margin: 0 5px 5px 0;">' + ComFunJS.convuser(ele) + '</label>';
                        }
                    })

                    html = html + '</div>';

                    $.dialog({
                        title: '未阅人员',
                        content: html,
                        button: ["确认"]
                    });
                    $(".ui-dialog-ft").find("button").click(function () {
                        $(".ui-dialog").remove();
                    });
                }
            },
            fdtp: function (obj) {
                if (!$(".fs_gallery").html()) {
                    $('.mall_pcp').fsgallery();
                    $(obj).trigger("click");
                }
            },
            viewwxx: function (el) {
                if (el.YLUrl) {
                    window.location = el.YLUrl;
                }
            }
        });
        avalon.ready(function () {
            //获取页面高度

            fheight = document.documentElement.clientHeight;

            if (strId != null) {

                $.getJSON('/api/Bll/ExeAction?Action=XXFB_UPXXFBREADUSER&r=' + Math.random(), { P1: strId, wxopenid: wxopenid }, function (data) {
                    if (data.ErrorMsg == "") {
                        $.getJSON('/api/Bll/ExeAction?Action=XXFB_GETXXFBMODELWX&r=' + Math.random(), { P1: strId, wxopenid: wxopenid }, function (resultData) {
                            if (resultData.ErrorMsg == "") {
                                if (resultData.Result.ID) {
                                    rwinfo.modelData = resultData.Result;
                                    rwinfo.plData = resultData.Result1;
                                    rwinfo.plcount = resultData.Result1.length;
                                    rwinfo.fjData = resultData.Result2;
                                    rwinfo.fjcount = resultData.Result2.length;
                                    rwinfo.wydData = resultData.Result3;;
                                    rwinfo.wydcount = resultData.Result3.length;
                                    rwinfo.TypeName = resultData.Result.remark;
                                    if (resultData.Result.ReadUser != null) {
                                        var ReadUserList = resultData.Result.ReadUser.split(',');
                                        rwinfo.ydData = ReadUserList;
                                        rwinfo.ydcount = ReadUserList.length;
                                    }
                                    rwinfo.ztData = resultData.Result4;

                                    setTimeout("setwatermark()", 300);
                                }
                                else {
                                    window.location.replace("UI_Error.html?msg=信息不存在或已删除");
                                }
                            }
                        })
                    }
                    else {
                        window.location.replace("UI_Error.html?msg=没有权限!");
                    }
                })

                $(".ui-btn").click(function () {
                    if ($("#content").val() == null || $("#content").val() == "") {
                        $.tips({
                            content: "请输入评论内容",
                            stayTime: 2000,
                            type: "warn"
                        })
                        return;
                    }


                    $.getJSON('/api/Auth/ExeAction?Action=ADDCOMENT&r=' + Math.random(), { "P1": $("#content").val(), "MsgType": "XXFB", "MsgLYID": strId, wxopenid: wxopenid }, function (resultData) {
                        if (resultData.ErrorMsg == "") {
                            rwinfo.plData.push(resultData.Result);
                            rwinfo.plcount = rwinfo.plcount + 1;
                            var el = $.tips({
                                content: "评论成功！！",
                                stayTime: 2000,
                                type: "success"
                            })
                            $("#content").val("");
                        }
                        else {
                            var el = $.tips({
                                content: "评论失败！！",
                                stayTime: 2000,
                                type: "warn"
                            })
                        }
                    })

                });
            }

        });

        function setwatermark() {
            var curuser = ComFunJS.convuser(ComFunJS.getCookie("username"));
            //if (curuser && rwinfo.modelData.IsSecret.toLowerCase() == "true") {
            watermark({ watermark_txt: curuser, watermark_y: $(".header").height() + 20, watermark_page_width: $("#details").width(), watermark_page_height: $("#details").height() });

            //}
        }
    </script>

    <style>
        .vote_box {
            position: relative;
            background-color: #fff;
            padding: 1em 0 0;
            overflow: hidden;
        }

            .vote_box:after, .vote_box:before {
                content: " ";
                position: absolute;
                left: 0;
                top: 0;
                width: 200%;
                height: 1px;
                border-top: 1px solid #e1e1df;
                -webkit-transform-origin: 0 0;
                transform-origin: 0 0;
                -webkit-transform: scale(0.5);
                transform: scale(0.5);
            }

            .vote_box:after {
                top: auto;
                bottom: -1px;
            }

            .vote_box.skin_help {
                display: none;
                position: absolute;
                top: 0;
                padding: 0;
                width: 15px;
            }

            .vote_box.po_left {
                left: -15px;
            }

            .vote_box.po_right {
                left: 100%;
            }

        blockquote, body, code, dd, div, dl, dt, fieldset, form, h1, h2, h3, h4, h5, h6, input, legend, p, pre, td, textarea, th {
            margin: 0;
            padding: 0;
        }

        pre {
            word-break: break-all;
            word-wrap: break-word;
        }

        table {
            border-spacing: 0;
        }

        fieldset, img {
            border: 0;
        }

        address, caption, cite, code, dfn, th, var {
            font-style: normal;
            font-weight: 400;
        }

        ol, ul {
            list-style: none;
        }

        caption, th {
            text-align: left;
        }

        h1, h2, h3, h4, h5, h6 {
            font-size: 100%;
            font-weight: 400;
        }

        q:after, q:before {
            content: '';
        }

        abbr, acronym {
            border: 0;
            font-variant: normal;
        }

        sup {
            vertical-align: text-top;
        }

        sub {
            vertical-align: text-bottom;
        }

        input, select, textarea {
            font-family: inherit;
            font-weight: inherit;
            font-size: 100%;
        }

        legend {
            color: #000;
        }

        body {
            background: #f8f7f5;
            color: #222;
            font-family: Helvetica,STHeiti STXihei,Microsoft JhengHei,Microsoft YaHei,Tohoma,Arial;
            height: 100%;
            position: relative;
        }

            body > .tips {
                display: none;
                left: 50%;
                padding: 20px;
                position: fixed;
                text-align: center;
                top: 50%;
                width: 200px;
                z-index: 100;
            }

        .page {
            padding: 15px;
        }

            .page .page-error, .page .page-loading {
                line-height: 30px;
                position: relative;
                text-align: center;
            }

        .btn {
            background-color: #fcfcfc;
            border: 1px solid #ccc;
            border-radius: 5px;
            box-shadow: 0 1px 4px rgba(0,0,0,.3);
            color: #222;
            cursor: pointer;
            display: block;
            font-size: 15px;
            font-weight: 700;
            margin: 15px 0;
            moz-box-shadow: 0 1px 4px rgba(0,0,0,.3);
            padding: 10px;
            text-align: center;
            text-decoration: none;
            webkit-box-shadow: 0 1px 4px rgba(0,0,0,.3);
        }

        .icons {
            background: url(http://res.wx.qq.com/mmbizwap/zh_CN/htmledition/images/icons.png) no-repeat 0 0;
            border-radius: 5px;
            height: 25px;
            overflow: hidden;
            position: relative;
            width: 25px;
        }

            .icons.arrow-r {
                background: url(http://res.wx.qq.com/mmbizwap/zh_CN/htmledition/images/brand_profileinweb_arrow2x.png) no-repeat center center;
                background-size: 100%;
                height: 16px;
                width: 12px;
            }

            .icons.check {
                background-position: -25px 0;
            }

        #activity-detail .page-bizinfo .header #activity-name {
            color: #000;
            font-size: 20px;
            font-weight: 700;
            white-space: pre-wrap;
            word-wrap: normal;
            word-break: normal;
        }

        .page-bizinfo {
            padding-left: 15px;
            padding-right: 15px;
        }

        .activity-meta {
            display: inline-block;
            line-height: 16px;
            vertical-align: middle;
            margin-left: 8px;
            padding-top: 2px;
            padding-bottom: 2px;
            color: #8c8c8c;
            font-size: 11px;
        }

            .activity-meta.no-extra {
                margin-left: 0;
            }

        .activity-info .text-ellipsis {
            display: inline-block;
            vertical-align: middle;
            max-width: 104px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        #post-user, a.activity-meta {
            text-decoration: none;
            outline: 0;
            color: #607fa6;
        }

            a.activity-meta:active {
                color: #607fa6;
            }

                a.activity-meta:active .icon_link_arrow {
                    background: transparent url(../images/link_arrow_right_blue.png) no-repeat 0 0;
                    -webkit-background-size: 100%;
                    -moz-background-size: 100%;
                    -o-background-size: 100%;
                    background-size: 100%;
                }

        .activity-info .icon_link_arrow {
            margin-left: 3px;
            margin-top: -5px;
        }

        .icon_link_arrow {
            display: none;
            vertical-align: middle;
            width: 7px;
            height: 7px;
            background: transparent url(../images/link_arrow_right_blue.png) no-repeat 0 0;
            -webkit-background-size: 100%;
            -moz-background-size: 100%;
            -o-background-size: 100%;
            background-size: 100%;
        }

        #activity-detail .page-content {
            margin: 0 0;
            padding-left: 15px;
            padding-right: 15px;
        }

            #activity-detail .page-content .media {
                margin: 18px 0;
            }

                #activity-detail .page-content .media img {
                    width: 100%;
                }

            #activity-detail .page-content .text {
                color: #3e3e3e;
                line-height: 1.5;
                width: 100%;
            }

                #activity-detail .page-content .text p {
                    *zoom: 1;
                    min-height: 1.5em;
                    white-space: pre-wrap;
                }

                    #activity-detail .page-content .text p:after {
                        content: "\200B";
                        display: block;
                        height: 0;
                        clear: both;
                    }

        #activity-list .header {
            font-size: 20px;
        }

        #activity-list .page-list {
            border: 1px solid #ccc;
            border-radius: 5px;
            margin: 18px 0;
            overflow: hidden;
        }

            #activity-list .page-list .line.btn {
                border-radius: 0;
                margin: 0;
                text-align: left;
            }

                #activity-list .page-list .line.btn .checkbox {
                    height: 25px;
                    line-height: 25px;
                    padding-left: 35px;
                    position: relative;
                }

                    #activity-list .page-list .line.btn .checkbox .icons {
                        background-color: #ccc;
                        left: 0;
                        position: absolute;
                        top: 0;
                    }

                #activity-list .page-list .line.btn.off .icons {
                    background-image: none;
                }

        .vm {
            vertical-align: middle;
        }

        .tc {
            text-align: center;
        }

        .db {
            display: block;
        }

        .dib {
            display: inline-block;
        }

        .b {
            font-weight: 700;
        }

        .clr {
            clear: both;
        }

        .text img {
            max-width: 100% !important;
            height: auto !important;
        }

        .page-toolbar {
            padding: 18px 0;
            overflow: hidden;
            *zoom: 1;
            height: 16px;
            line-height: 16px;
        }

            .page-toolbar a {
                color: #607fa6;
                font-size: 14px;
                text-decoration: none;
                text-shadow: 0 1px #fff;
                -webkit-text-shadow: 0 1px #fff;
                -moz-text-shadow: 0 1px #fff;
            }

        .page-url {
            float: left;
        }

        .page-toolbar a.page-imform {
            float: right;
            color: #7b7b7b;
        }

        .page-toolbar .pager {
            display: block;
            margin: 0 auto -16px;
            text-align: center;
            font-size: 14px;
        }

            .page-toolbar .pager a {
                margin: 0 10px;
            }

        .page-toolarea {
            font-size: 14px;
            padding: 10px 0 20px;
        }

            .page-toolarea a {
                display: block;
                line-height: 2em;
                color: #7b7b7b;
                text-decoration: none;
            }

            .page-toolarea .icon_arrow_gray {
                margin-left: 5px;
                margin-top: -.2em;
            }

        .res_iframe {
            width: 100%;
            background-color: transparent;
            border: 0;
        }

        .card_iframe {
            min-height: 185px;
            background-color: transparent;
            border: none;
        }

        .line_title {
            text-align: center;
            margin-top: 20px;
            border-top: 1px dotted #a8a8a7;
        }

            .line_title .tips {
                display: inline-block;
                position: relative;
                top: -9px;
                padding-left: 16px;
                padding-right: 16px;
                font-size: 14px;
                color: #cfcfcf;
                background-color: #f8f7f5;
                text-decoration: none;
            }

        .icon_arrow_gray {
            display: inline-block;
            vertical-align: middle;
            width: 7px;
            height: 7px;
            background: transparent url(../images/icon_arrow_gray.png) no-repeat 0 0;
            -webkit-background-size: 100%;
            -moz-background-size: 100%;
            -o-background-size: 100%;
            background-size: 100%;
        }

        .selectTdClass {
            background-color: #edf5fa !important;
        }

        table.noBorderTable caption, table.noBorderTable td, table.noBorderTable th {
            border: 1px dashed #ddd !important;
        }

        table {
            margin-bottom: 10px;
            border-collapse: collapse;
            display: table;
            width: 100% !important;
        }

        td, th {
            word-wrap: break-word;
            word-break: break-all;
            padding: 5px 10px;
            border: 1px solid #ddd;
        }

        caption {
            border: 1px dashed #DDD;
            border-bottom: 0;
            padding: 3px;
            text-align: center;
        }

        th {
            border-top: 2px solid #BBB;
            background: #f7f7f7;
        }

        .ue-table-interlace-color-single {
            background-color: #fcfcfc;
        }

        .ue-table-interlace-color-double {
            background-color: #f7faff;
        }

        td p {
            margin: 0;
            padding: 0;
        }

        .vote_area {
            position: relative;
            display: block;
            margin: 14px 0;
            white-space: normal !important;
        }

        .vote_iframe {
            width: 100%;
            height: 100%;
            background-color: transparent;
            border: 0;
        }

        .text {
            word-wrap: break-word;
            -webkit-hyphens: auto;
            -ms-hyphens: auto;
            hyphens: auto;
            -webkit-nbsp-mode: space;
        }

            .text * {
                max-width: 100%;
            }

        #nickname {
            overflow: hidden;
            white-space: nowrap;
            text-overflow: ellipsis;
            max-width: 90%;
        }

        #activity-detail .page-content .text {
            font-size: 16px;
        }

        .header {
            margin-top: 10px;
        }


        #activity-name {
            text-align: center;
            color: #000;
            font-size: 20px;
            font-weight: 700;
            white-space: pre-wrap;
            word-wrap: normal;
            word-break: normal;
            padding-bottom: 10px;
        }

        .ms-controller, [ms-controller] {
            display: none;
        }

        .ui-list > li {
            margin: 3px;
            padding-left: 15px;
        }

        .layermcont {
            overflow-y: auto;
            max-height: 100%;
            position: relative;
        }

        .ui-dialog-bd {
            padding: 10px;
        }
    </style>
</head>

<body id="activity-detail" ms-controller="xxinfo">

    <div id="page-content" class="page-content">
        <div id="img-content">
            <div class="header">
                <h1 id="activity-name" style="border-bottom: 1px dotted #ccc; overflow: hidden; word-wrap: break-word; word-break: break-all;">{{modelData.XXTitle}}</h1>
                <p class="activity-info">
                    <span></span>
                    <em id="post-date" class="activity-meta no-extra" style="font-style: normal">{{modelData.FBTime}}</em>
                    <em class="activity-meta" style="font-style: normal">{{modelData.Author}}</em>
                    <a href="javascript:viewProfile();" id="post-user" class="activity-meta"><span class="text-ellipsis"></span></a>
                </p>
            </div>
            <div id="details" class="text" style="overflow: hidden; word-wrap: break-word; word-break: break-all;min-height: 400px;">
                {{modelData.XXContent|html}}
            </div>
            <ul class="ui-list">
                <li class="ui-border-t" ms-repeat-el="fjData" style="padding: 5px; font-size: 14px; border: 1px solid #C8CACD;">

                    <div style="padding-right: 10px">
                        <img ms-on-click="fdtp(this)" class="mall_pcp" style="height: 40px; width: 40px" ms-if="ComFunJS.xstp(el.FileExtendName)" ms-attr-src="{{ComFunJS.getfile(el.ID)}}" />
                        <img ms-on-click="viewwxx(el)" style="height: 40px; width: 40px" ms-if="!ComFunJS.xstp(el.FileExtendName)" ms-attr-src="../Images/qywd/{{el.FileExtendName}}.png" onerror="javascript: this.src = '/View_Mobile/Images/qywd/file.png'" />
                    </div>
                    <div class="ui-list-info" ms-on-click="viewwxx(el)" style="padding: 0;">
                        <h4 class="ui-nowrap">{{el.Name}}.{{el.FileExtendName}}</h4>
                        <p class="ui-nowrap">{{Math.round(el.FileSize/1024)}}kb</p>
                    </div>
                    <div>
                        <a ms-attr-href="{{ComFunJS.getfile(el.ID)}}" class="external">
                            <img style="height: 20px; width: 20px; float: right; padding: 10px;" src="../Images/down.png" />
                        </a>
                    </div>

                </li>
            </ul>

            <p class="page-toolbar" style="padding-bottom: 25px;">
                <em class="activity-meta" style="font-style: normal; margin-left: 0"><a ms-click="yy()">已阅({{ydcount}})</a></em> &nbsp;&nbsp;
                <em class="activity-meta" style="font-style: normal; margin-left: 0"><a ms-click="wy()">未阅({{wydcount}})</a></em>&nbsp;&nbsp;
                <em class="activity-meta" style="font-style: normal; margin-left: 0" ms-if="ztData.isPL=='1'"><a ms-click="pl()">评论({{plcount}})</a></em>
            </p>
        </div>
    </div>
    <div class="ui-form ui-border-t" style="padding-bottom: 44px; background: #f8f7f5;">
        <ul class="ui-list xxpl " style="display: none;">
            <li class=" ui-border " ms-repeat-el="plData" style="padding: 5px; height: auto;">
                <div style="padding-right: 10px">
                    <img ms-src="/upload/tx/1_{{el.CRUser}}.jpg" onerror="javascript: this.src = '/ViewV5/images/head.jpg'" style='width: 40px; height: 40px;' >
                </div>
                <div class="ui-list-info" style="padding: 0;">
                    <div style="padding: 0; display: -webkit-box;">
                        <div class="ui-list-info" style="padding: 0;">
                            <h4 class="ui-nowrap" style="font-size: 12px">{{ComFunJS.convuser(el.CRUser)}}</h4>
                        </div>
                        <div style="margin-right: 10px; font-size: 12px;">{{el.CRDate|date("yyyy-MM-dd HH:mm")}}</div>
                    </div>
                    <p style="margin-bottom: 5px; font-size: 12px; overflow: hidden; word-wrap: break-word; word-break: break-all;" class="ui-txt-justify" ms-html="el.MSGContent"></p>
                </div>
            </li>
        </ul>
    </div>
    <div class="ui-footer ui-footer-stable ui-btn-group ui-border-t" style="display: none; z-index: 10000;">
        <section class="ui-input-wrap ui-border-t" style="width: 100%">
            <div class="ui-input ui-border-radius">
                <input id="content" type="text" name="" value="" placeholder="我也说一句...">
            </div>
            <button class="ui-btn">评论</button>
        </section>
    </div>
</body>

</html>
